package com.ge.modules.sys.service.impl;

import com.ge.modules.dao.TbCommodityDao;
import com.ge.modules.entity.TbCommodityEntity;
import com.ge.modules.sys.service.SysCommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class SysCommodityServiceImpl implements SysCommodityService {
	@Autowired
	private TbCommodityDao tbCommodityDao;
	
	@Override
	public TbCommodityEntity queryObject(Integer id){
		return tbCommodityDao.queryObject(id);
	}
	
	@Override
	public List<TbCommodityEntity> queryList(Map<String, Object> map){
		return tbCommodityDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return tbCommodityDao.queryTotal(map);
	}
	
	@Override
	public void save(TbCommodityEntity commodity){
		tbCommodityDao.save(commodity);
	}
	
	@Override
	public void update(TbCommodityEntity commodity){
		tbCommodityDao.update(commodity);
	}
	
	@Override
	public void delete(Integer id){
		tbCommodityDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		for (int i = 0;i<ids.length;i++){
//			TbCommodityDao.updateStatus(ids[i]);
		}
	}

	@Override
	public TbCommodityEntity queryId(Object id) {
		return tbCommodityDao.queryId(id);
	}

}
